<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">  
<head>  
<title>{{ get_app_inf key="siteName" }} - {{ $title }}</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />  
<!-- add your meta tags here -->  
  
<link href="css/my_layout.css" rel="stylesheet" type="text/css" />
<link href="css/screen/datadict.css" rel="stylesheet" type="text/css" />
<!--[if lte IE 7]>  
<link href="css/my_patches/patch_my_layout.css" rel="stylesheet" type="text/css" />  
<![endif]-->  
<script type="text/javascript" src="script/jquery.js"><!-- jQuery 1.2.1 --></script>
<script type="text/javascript" src="script/jquery.form.js"><!-- 表单Ajax插件 --></script>
<script type="text/javascript">
// DOM载入时执行
$(function() {
	
	// 变色
	$("tbody tr, input:button").hover(function(){
		$(this).addClass("OMover");
	},function(){
		$(this).removeClass("OMover");
	});
	
	// 保存修改后的数据字典备注
	$("#savebutton").click(function(){
	
		$("#form_saveremark").ajaxSubmit({
	        success: function(response) {
	        	if(response){
	            	alert("已经成功保存");
	            }else{
	            	alert("未知错误");
	            }
	        },
	        url: "{{ url controller=admin_tools action=saveremark }}",
	        type: "post"
	    });
	    
	});



});

</script>

</head>  
<body> 
  <div id="page_margins">

    <div id="border-top">
      <div id="edge-tl"></div>
      <div id="edge-tr"></div>
    </div>
    <div id="page">
      {{ include file="admin/Websetup_header.html" }}
      {{ include file="admin/Websetup_nav.html" }}

      <div id="main">
        <div id="col1">
          <div id="col1_content" class="clearfix">
				{{ webcontrol type="menu" name="myMenu" }}
          </div>
        </div>
        <div id="col3">
          <div id="col3_content" class="clearfix">
          
          	<!-- begin: #div_datadict -->
          	<div id="div_datadict">
          	<form id="form_saveremark">
          	
          	<h1>{{ $title }}：</h1>
          	<h2>	
          		您可以修改备注的信息，修改后<input id="savebutton" type="button" value="点击这里保存" />，
          		<a href="{{ url controller='admin_tools' action='datadictprintview' }}" target="_blank">方便打印的版本</a>
          	</h2>
	          	{{ foreach from=$tables item=table }}
	          		<h1>{{ $table.table_name }}</h1>
	            	<table>
	            	<thead>
		            	<tr>
		            		<td>字段</td>
		            		<td>类型</td>
		            		<td>NULL</td>
		            		<td>默认值</td>
		            		<td>备注</td>
		            	</tr>
		            </thead>
		            <tbody>
					{{ foreach from=$table.fields item=value }}
	            	<tr>
	            		<td>{{ $value.name }}</td>
	            		<td>{{ $value.type }}</td>
	            		<td>{{ $value.null }}</td>
	            		<td>{{ $value.default }}</td>
	            		<td><input name="{{ $table.table_name }}_{{ $value.name }}" size="35" value="{{ $value.remark }}" /></td>
	            	</tr>
					{{ /foreach }}
					</tbody>
	            	</table>
	            {{ /foreach }}
	        </form>
	      	</div>
	      	<!-- end: #div_datadict -->
	      	
          </div>
          <!-- IE Column Clearing -->
          <div id="ie_clearing"> &#160; </div>
        </div>
      </div>
      <!-- begin: #footer -->
      {{ include file="admin/Websetup_footer.html" }}
    </div>
    <div id="border-bottom">
      <div id="edge-bl"></div>
      <div id="edge-br"></div>
    </div>
  </div>
</body>
</html>
